- f = nil unless local_assigns[:f]

- if f
  %fieldset
    %legend Job Details
    %table{:border => "0", :cellspacing => "2", :cellpadding => "2"}
      %tr
        %td{:colspan => "2"}
          - JobType.list.each do |job_type|
            %label
              = f.radio_button :job_type_id, job_type.id
              = job_type_image(job_type)
          = nbsp*2
          = f.select :category_id, Category.to_select
    
      -# title field
      %tr
        %td.publish-label{:valign => "top"} Title:
        %td
          = f.text_field :title, :size => 50
          = error_message_for(@job, :title)
          
          .suggestion e.g. 'PHP Developer', 'UI designer'
    
      -# location field
      %tr
        %td{:valign => "top"} Location:
        %td
          = f.select :location_id, Location.to_select, :disabled => !@job.outside_location.blank?, :include_blank => "-- Anywhere --"
          = link_to @job.location_switch_label, "#", :id => "other_location_label", :onclick => "Jobber.HandleLocationOutside(); return false;"
          #outside_location{hide_if(@job.outside_location.blank?)}
            where ?
            = f.text_field :outside_location, :size => 50, :maxlength => 140
            = error_message_for(@job, :outside_location)
            .suggestion
              e.g. 'London, UK'
    
      -# description field
      %tr
        %td{:valign => "top"} Description:
        %td
          = f.text_area :description, :size => "80x15"
          = error_message_for(@job, :description)
          .suggestion
            = link_to "Format text with Textile", "http://www.textism.com/tools/textile/", |
                      :target => "_blank", :onclick => "$j('#textile-suggestions').toggle();return false;" |              
          = partial "jobs/parts/textile_suggestions"

  -# Company Details
  %fieldset
    %legend Hiring Company or Person
    %table{:border => "0", :cellspacing => "2", :cellpadding => "2"}
      -# company field
      %tr
        %td.publish-label Name:
        %td
          = f.text_field :company, :size => 40
          = error_message_for(@job, :company)
          
      -# website field
      %tr
        %td{:valign => "top"} Website:
        %td
          == http://#{f.text_field :url, :size => 35}
          -# .suggestion e.g. 'www.google.com'
    
      -# email field
      %tr
        %td.publish-label
          Email:
          = br
          %strong (not published)
        %td
          = f.text_field :poster_email
          = error_message_for(@job, :poster_email)
          .suggestion
            Online applications will be sent to this address.
    
      -# email field
      %tr
        %td.publish-label
          Apply Online:
        %td
          %label
            = f.check_box :apply_online, :style => "vertical-align: -3px"
            %span.suggestion
              Allow candidates to apply directly from your post.